<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	    		xmlns:ui="http://java.sun.com/jsf/facelets"
	  			xmlns:h="http://java.sun.com/jsf/html"
	  			xmlns:f="http://java.sun.com/jsf/core"
                xmlns:sf="http://www.springframework.org/tags/faces"
                xmlns:sec="http://www.springframework.org/security/facelets/tags"
                xmlns:c="http://java.sun.com/jstl/core" 
				template="/WEB-INF/layouts/template.xhtml">

<ui:define name="main">
<div id="main">
	<div id="wrapper" class="yui-b">
		<h3 class="title">
			<ui:insert name="title"><h:outputText value="${msg.title_group_edit} ${group.name}" /></ui:insert>
		</h3>
		<ui:fragment id="messages">
			<div id="messagesInsertionPoint">
				<h:messages errorClass="errors" />
			</div>
		</ui:fragment>
		<div class="wrapper">
			<h:form id="group">	
				<div class="yui-gd">
					<div class="yui-u first">
						<div class="field">
							<div class="label">
								<h:outputLabel for="name">${msg.name}</h:outputLabel>
							</div>
							<div class="input">
								<h:inputText id="name" value="${group.name}"/>
							</div>
						</div>
						<div class="field">
							<div class="label">
								<h:outputLabel for="street">${msg.street} </h:outputLabel>
							</div>
							<div class="input">
								<h:inputText id="street" value="${group.address.street}"/>
							</div>
						</div>
						<div class="field">
							<div class="label">
								<h:outputLabel for="number">${msg.number} </h:outputLabel>
							</div>
							<div class="input">
								<h:inputText id="number" value="${group.address.number}"/>
							</div>
						</div>
						<div class="field">
							<div class="label">
								<h:outputLabel for="city">${msg.city} </h:outputLabel>
							</div>
							<div class="input">
								<h:inputText id="city" value="${group.address.city}"/>
							</div>
						</div>
						<div class="field">
							<div class="label">
								<h:outputLabel for="zipcode">${msg.zipcode} </h:outputLabel>
							</div>
							<div class="input">
								<h:inputText id="zipcode" value="${group.address.zipcode}"/>
							</div>
						</div>
						<div class="field">
							<div class="label">
								<h:outputLabel for="country">${msg.country} </h:outputLabel>
							</div>
							<div class="input">
								<h:inputText id="country" value="${group.address.country}"/>
							</div>
						</div>
						<div class="field">
							<div class="label">
								<h:outputLabel for="email">${msg.email} </h:outputLabel>
							</div>
							<div class="input">
								<h:inputText id="email" value="${group.email}"/>
							</div>
						</div>
						<div class="field">
							<div class="label">
								<h:outputLabel for="phone">${msg.phone} </h:outputLabel>
							</div>
							<div class="input">
								<h:inputText id="phone" value="${group.phone}"/>
							</div>
						</div>
						<div class="field">
							<div class="label">
								<h:outputLabel for="fax">${msg.fax} </h:outputLabel>
							</div>
							<div class="input">
								<h:inputText id="fax" value="${group.fax}"/>
							</div>
						</div>
						<div class="field">
							<div class="label">
								<h:outputLabel for="url">${msg.url} </h:outputLabel>
							</div>
							<div class="input">
								<h:inputText id="url" value="${group.url}"/>
							</div>
						</div>
					</div>
				
					<div class="yui-u">
						<div class="field">
							<div class="label">
								<h:outputLabel for="hours">${msg.workdaylength} </h:outputLabel>
							</div>
							<div class="input">
								<h:inputText id="hours" value="${group.workDayLength}"/>
							</div>
						</div>
						<div class="field">
							<div class="label">
								<h:outputLabel>${msg.workingdays} </h:outputLabel>
							</div>
		
							<div class="label">
								<h:selectBooleanCheckbox id="workingmonday" value="${group.isWorkingMonday }"/>
								<h:outputLabel for="workingmonday">${msg.monday} </h:outputLabel>
							</div>
		
							<div class="label">
								<h:selectBooleanCheckbox id="workingtuesday" value="${group.isWorkingTuesday }"/>
								<h:outputLabel for="workingmonday">${msg.tuesday} </h:outputLabel>
							</div>
		
							<div class="label">
								<h:selectBooleanCheckbox id="workingwednesday" value="${group.isWorkingWednesday }"/>
								<h:outputLabel for="workingwednesday">${msg.wednesday} </h:outputLabel>
							</div>
		
							<div class="label">
								<h:selectBooleanCheckbox id="workingthursday" value="${group.isWorkingThursday }"/>
								<h:outputLabel for="workingthursday">${msg.thursday} </h:outputLabel>
							</div>
		
							<div class="label">
								<h:selectBooleanCheckbox id="workingfriday" value="${group.isWorkingFriday }"/>
								<h:outputLabel for="workingfriday">${msg.friday} </h:outputLabel>
							</div>
		
							<div class="label">
								<h:selectBooleanCheckbox id="workingsaturday" value="${group.isWorkingSaturday }"/>
								<h:outputLabel for="workingsaturday">${msg.saturday} </h:outputLabel>
							</div>
		
							<div class="label">
								<h:selectBooleanCheckbox id="workingsunday" value="${group.isWorkingSunday }"/>
								<h:outputLabel for="workingsunday">${msg.sunday} </h:outputLabel>
							</div>
						</div>
						<div class="field">
							<div class="label">
								<h:outputLabel for="weekstartday">${msg.weekstartday} </h:outputLabel>
							</div>
							<div class="input">
								<h:selectOneMenu id="weekstartday" value="${group.weekStartDay}">
									<f:selectItem itemValue="MONDAY" itemLabel="${msg.monday}"/>
									<f:selectItem itemValue="TUESDAY" itemLabel="${msg.tuesday}"/>
									<f:selectItem itemValue="WEDNESDAY" itemLabel="${msg.wednesday}"/>
									<f:selectItem itemValue="THURSDAY" itemLabel="${msg.thursday}"/>
									<f:selectItem itemValue="FRIDAY" itemLabel="${msg.friday}"/>
									<f:selectItem itemValue="SATURDAY" itemLabel="${msg.saturday}"/>
									<f:selectItem itemValue="SUNDAY" itemLabel="${msg.sunday}"/>
								</h:selectOneMenu>
							</div>
						</div>
					</div>
				</div>
				<div style="clear: both; height: 5px;" />
				<div>
					<sf:commandLink id="save" action="save" processIds="*"><div class="button">${msg.save}</div></sf:commandLink>
				</div>
				<div style="clear: both; height: 5px;" />
			</h:form>
		</div>
	</div>
</div>
<div style="clear: both; height: 5px;" />
<div>
	<h:form rendered="${group.id > 0}">
		<sf:commandLink id="back" action="back"><div class="button">${msg.back} ${msg.mygroup}</div></sf:commandLink>
	</h:form>
</div>
</ui:define>
</ui:composition>